<?php

!defined('DEBUG') AND exit('Access Denied.');

//$user = user_read($uid);
//user_login_check();
if(!defined('SKIP_ROUTE')){
	$type = 'sid';
	$sid = param(1);
}elseif(SKIP_ROUTE == 'shop'){
	$type = 'shophost';
	$shop = shop__read_by_host($shophost);
	$sid = $shop['sid'];
}
// hook post_start.php

if ($sid == 'create') {

} else {
	if($type == 'sid'){
		$shop = shop_read_cache($sid);
	}
	empty($shop) AND message(-1,'店铺不存在');
	$shop['intro'] = htmlspecialchars_decode($shop['intro']);
	$shop['service'] = htmlspecialchars_decode($shop['service']);
	$shop['hot'] = htmlspecialchars_decode($shop['hot']);
	$shop['contact'] = htmlspecialchars_decode($shop['contact']);
	$shop['lxfs'] = htmlspecialchars_decode($shop['lxfs']);
	$shop['friendly'] = xn_json_decode($shop['friendly']);
	empty($shop['friendly']) AND $shop['friendly'] = array();
	$shop['contact'] = xn_json_decode($shop['contact']);
	empty($shop['contact']) AND $shop['contact'] = array();
	$shop['case'] = xn_json_decode($shop['case']);
	empty($shop['case']) AND $shop['case'] = array();
	include _include(APP_PATH . 'view/htm/shop/index.htm');
}

?>